package cn.buddha.jesdp.strategy.simple;

/**
 * @ClassName StrategyPattern
 * @Author 友野浩二
 * @Description 策略模式测试类
 * @Version 1.0
 */
public class StrategyPattern {

    public static void main(String[] args) {
        Context context = new Context();

        Strategy strategy = new ConcreteStrategyA();
        context.setStrategy(strategy);
        context.strategyMethod();

        System.out.println("<<<<======== ========>>>>");

        strategy = new ConcreteStrategyB();
        context.setStrategy(strategy);
        context.strategyMethod();
    }

}
